//
//  NSNull+JSON.m
//  book
//
//  Created by lj on 14-5-20.
//  Copyright (c) 2014年 cczone. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface NSNull (JSON)
@end

@implementation NSNull (JSON)

- (NSUInteger)length
{
    return 0;
}

- (NSInteger)integerValue { return 0; };

- (NSInteger)intValue { return 0; };

- (CGFloat)floatValue { return 0; };

- (NSArray *)componentsSeparatedByString:(NSString *)separator { return @[]; }

- (id)objectForKey:(id)key { return nil; }

- (BOOL)boolValue { return NO; }

-(int)count {return 0;}

-(BOOL)isEqualToString:(NSString *)s
{
    return NO;
}

- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options attributes:(NSDictionary *)attributes context:(NSStringDrawingContext *)context
{
    return CGRectMake(0, 0, 50, 15);
}

-(NSString *)stringValue
{
    return nil;
}
@end